<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
		<script type="text/javascript" src="../js/angular-route.min.js"></script>
	</head>

	<body ng-app="myapp">
		<div>
			<h1>HEAD</h1>
			<ul>
				<li><a href="#/">首页</a></li>
				<li><a href="#/user">用户管理</a></li>
				<li><a href="#/product">商品管理</a></li>
			</ul>
		</div>
		<div ng-view></div>
		<div>
			<h1>FOOTER</h1>
		</div>
	</body>
	<script type="text/javascript">
		//初始化myapp模块
		var myapp = angular.module("myapp", ["ngRoute"]);
		//定义模块的控制器
		myapp.config(["$routeProvider", function($routeProvider) {
			$routeProvider.when("/", {
				templateUrl: "5_1.html"
			}).when("/user", {
				templateUrl: "5_2.html"
			}).when("/product", {
				templateUrl: '5_3.html'
			})
		}]);
	</script>

</html>